<?php
require_once ('../../connexion.php');
$mail=$_POST['mail'];

	$sql = 'SELECT login FROM membres WHERE mail=:mail';
	$select = $connection->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
	$select->execute(array(':mail' => $mail));
	$enregistrement = $select->fetch(PDO::FETCH_OBJ);
	if ($enregistrement==true)
	{
		echo "<ul><li>Adresse e-mail déjà utilisée</li></ul>";
	}
	else
	{
		echo "";
	}

?>